/// 关注关系数据模型
/// 表示两个用户之间的关注关系
class FollowBond {
  final String followerId;
  final String followingId;

  FollowBond({required this.followerId, required this.followingId});

  /// 从Map创建FollowBond
  factory FollowBond.fromMap(Map<String, dynamic> map) {
    return FollowBond(
      followerId: map['followerId'] as String,
      followingId: map['followingId'] as String,
    );
  }

  /// 转换为Map
  Map<String, dynamic> toMap() {
    return {'followerId': followerId, 'followingId': followingId};
  }

  @override
  bool operator ==(Object other) {
    if (identical(this, other)) return true;
    return other is FollowBond &&
        other.followerId == followerId &&
        other.followingId == followingId;
  }

  @override
  int get hashCode => followerId.hashCode ^ followingId.hashCode;
}
